package com.bdqn.vo;

public class ReturnVo {

    private String code;//成功：2000；失败：5000

    private String message;

    private Object data;

    public ReturnVo(String code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public static ReturnVo error(String message) {
        return new ReturnVo("5000" , message, null);
    }

    public static ReturnVo success(String message, Object data){
        return new ReturnVo("2000" , message, data);
    }
}
